﻿using Newtonsoft.Json;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.WebAPI.Models
{
    public class ConfigData
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [JsonProperty("id"), JsonPropertyName("id")]
        public long Id { get; set; }

        /// <summary>
        /// 分组Id
        /// </summary>
        [JsonProperty("group_id"), JsonPropertyName("group_id")]
        public long GroupId { get; set; }

        /// <summary>
        /// 参数名称
        /// </summary>
        [JsonProperty("config_name"), JsonPropertyName("config_name")]
        public string ConfigName { get; set; }

        /// <summary>
        /// 参数值
        /// </summary>
        [JsonProperty("config_value"), JsonPropertyName("config_value")]
        public string ConfigValue { get; set; }

        /// <summary>
        /// 参数值
        /// </summary>
        [JsonProperty("switch_value"), JsonPropertyName("switch_value")]
        public bool SwitchValue { get; set; }

        /// <summary>
        /// 参数类型
        /// </summary>
        [JsonProperty("config_type"), JsonPropertyName("config_type")]
        public string ConfigType { get; set; }

        ///// <summary>
        ///// 创建时间
        ///// </summary>
        //[Column("create_time")]

        //public DateTime CreateTime { get; set; } = DateTime.Now;

        ///// <summary>
        ///// 更新时间
        ///// </summary>
        //[Column("update_time")]
        //public DateTime UpdateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 备注
        /// </summary>
        [JsonProperty("remark"), JsonPropertyName("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 控件类型
        /// </summary>
        [JsonProperty("control_type"), JsonPropertyName("control_type")]
        public string ControlType { get; set; }
        /// <summary>
        /// 控件图标
        /// </summary>
        [JsonProperty("control_icon"), JsonPropertyName("control_icon")]
        public string ControlIcon { get; set; }
    }
}
